assume cs:code, ds:data, ss:stack

data segment
    month db 8
    db 8 dup(0)
    day db 8
    db 8 dup(0)
    year db 8
    db 8 dup(0)
    crlf db 0ah, 0dh, '$'
    msg db "WHAT IS THE DATE?",'$'
    sep db "-",'$'
data ends

stack segment
    dw 0,0,0,0,0,0,0,0
stack ends


code segment
    start: mov ax, data
        mov ds, ax

        mov ax, stack
        mov ss, ax
        mov sp, 16

        lea dx, msg
        mov ah, 09h
        int 21h

        lea dx, crlf
        mov ah, 09h
        int 21h

        call GetNum

        lea dx, crlf
        mov ah, 09h
        int 21h
        
        mov ax, 20
        mov si, ax

        call Disp

        lea dx, sep
        mov ah, 09h
        int 21h

        mov ax, 2
        mov si, ax

        call Disp

        lea dx, sep
        mov ah, 09h
        int 21h
        
        mov ax, 11
        mov si, ax

        call Disp

        mov ax, 4c00h
        int 21h

    GetNum: 
        lea dx, month
        mov ah, 0ah
        int 21h

        mov al, month + 1
        add al, 2
        mov ah, 0
        mov si, ax
        mov month[si], '$'

        lea dx, crlf
        mov ah, 09h
        int 21h

        lea dx, day
        mov ah, 0ah
        int 21h

        mov al, day + 1
        add al, 2
        mov ah, 0
        mov si, ax
        mov day[si], '$'

        ; lea dx, month + 2
        ; mov ah, 09h
        ; int 21h

        lea dx, crlf
        mov ah, 09h
        int 21h

        lea dx, year
        mov ah, 0ah
        int 21h

        mov al, year + 1
        add al, 2
        mov ah, 0
        mov si, ax
        mov year[si], '$'

        lea dx, crlf
        mov ah, 09h
        int 21h
        ; lea dx, crlf
        ; mov ah, 09h
        ; int 21h

        ; lea dx, month + 2
        ; mov ah, 09h
        ; int 21h

        ret

    Disp: 
        lea dx, [si]
        mov ah, 09h
        int 21h

        ret

code ends


end start